package io.litchi.auth.domain.entity.auth;

import io.litchi.common.base.BaseEntity;
import jakarta.persistence.*;
import lombok.*;
import lombok.experimental.FieldDefaults;
import org.hibernate.annotations.Comment;

/**
 * description: 角色
 *
 * @author helang
 * @since 2025-09-18
 */
@EqualsAndHashCode(of = "id", callSuper = false)
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Data
@ToString
@FieldDefaults(level = AccessLevel.PRIVATE)
@Table(name = "role")
@Comment("角色表")
public class Role extends BaseEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id",nullable = false, unique = true,columnDefinition = "BIGINT(20) COMMENT 'id'")
    Long id;

    @Column(name = "role_name", columnDefinition = "VARCHAR(10) COMMENT '角色名称'")
    String roleName;

    @Column(name = "role_desc", columnDefinition = "VARCHAR(128) COMMENT '角色描述'")
    String roleDesc;

    @Column(name = "role_code", columnDefinition = "VARCHAR(64) COMMENT '角色编码'")
    String roleCode;


}